<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>书籍审核</title>
</head>
<body>
	<table>
		<thead>
			<tr>
				<td>图片</td>
				<td>名称</td>
				<td>单价</td>
				<td>状态</td>
				<td>上传时间</td>
				<td>打开书籍</td>
				<td>禁书</td>
			</tr>
		</thead>
		<tbody>
			<s:iterator value="view.records" var="book_list">
				<tr>
					<td>
						<div style="width: 80px;height: 80px;overflow: hidden;">
							<img alt="" src="${book_list.logo_300}" width="80" height="80">
						</div>
					</td>
					<td>${book_list.bookName}</td>
					<td>${book_list.price}</td>
					<td>
						<s:if test="#book_list.show==1">上架</s:if>
						<s:elseif test="#book_list.show==2">待审核</s:elseif>
						<s:elseif test="#book_list.show==3">待删除的书籍 </s:elseif>
						<s:elseif test="#book_list.show==4">禁书 </s:elseif>
					</td>
					<td>${book_list.dateLine}</td>
					<td>
						<c:if test="${fn:length(book_list.path)>0}">
							<s:a namespace="/forward/file" action="download.go">
								<s:param name="inputPath" value="#book_list.path"></s:param>
								<input type="image" src="/image/front/btn_down.gif"/>
							</s:a>
						</c:if>
					</td>
					<td><input type="image" value="设置为禁书" onclick="auditingBook('${book_list.id}')"/></td>
				</tr>
			</s:iterator>
		</tbody>
		<tfoot>
			<tr>
				<td colspan="7">
					<font>当前页:第${view.currentpage}页 | 总记录数:${view.totalrecord}条 | 每页显示:${view.maxrecord} | 总页数:${view.totalpage}页
					</font>　
					<br/>
					<s:iterator begin="view.pageindex.startindex" end="view.pageindex.endindex" var="pageIndex">
						<s:if test="view.currentpage==#pageIndex">
							<b><font color="#00ffff">${pageIndex}</font></b>
						</s:if>
						<s:else> 
							<a onclick="changeContent('/control/mapping/book_newBook.go','page=${pageIndex}&maxrecord=${maxrecord}')">[${pageIndex}]</a>
						</s:else>
					</s:iterator>
				</td>
			</tr>
		</tfoot>
	</table>
</body>
</html>